package com.morehair.mapper;

import com.morehair.bean.pojo.AttributeOfGoods;
import com.morehair.bean.pojo.AttributeOfGoodsExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AttributeOfGoodsMapper {
    long countByExample(AttributeOfGoodsExample example);

    int deleteByExample(AttributeOfGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(AttributeOfGoods record);

    int insertSelective(AttributeOfGoods record);

    List<AttributeOfGoods> selectByExample(AttributeOfGoodsExample example);

    AttributeOfGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") AttributeOfGoods record, @Param("example") AttributeOfGoodsExample example);

    int updateByExample(@Param("record") AttributeOfGoods record, @Param("example") AttributeOfGoodsExample example);

    int updateByPrimaryKeySelective(AttributeOfGoods record);

    int updateByPrimaryKey(AttributeOfGoods record);


    /**
     * 自写
     * @param id
     */
    List<AttributeOfGoods> selectByGoodsId(Integer id);

    int selectByGoodsIdAndNoDeleted(@Param("goodsId") Integer goodsId);

    void updateBeforeDeleteById(@Param("goodsId") Integer goodsId);
}